import { createStore } from 'vuex'

// 创建一个新的 store 实例
export default createStore({
  state: {
    cartlist: '',
    num: 0,
    list:''
  },
    mutations: {
      addcart(state, value) {
        state.cartlist = value
      },
      addnum(state, value) {
        state.num = value
      },
      addlist(state, value) {
        state.list = value
      },
    }
  })


// 将 store 实例作为插件安装